package com.yuw;

public class Student {
    // 属性
    private String stuName;
    private int stuAge;
    private String stuNo;

    // 组合关系
    private Teacher teacher;

    public Student() {
    }

    public Student(String stuName, int stuAge, String stuNo) {
        this.stuName = stuName;
        this.stuAge = stuAge;
        this.stuNo = stuNo;
    }

    // 行为方法
    public void doStuding() {
        System.out.println(" I am studing...");
    }

    @Override
    public String toString() {
        return "Student{" +
                "stuName='" + stuName + '\'' +
                ", stuAge=" + stuAge +
                ", stuNo='" + stuNo + '\'' +
                ", teacher=" + teacher +
                '}';
    }


    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public int getStuAge() {
        return stuAge;
    }

    public void setStuAge(int stuAge) {
        this.stuAge = stuAge;
    }

    public String getStuNo() {
        return stuNo;
    }

    public void setStuNo(String stuNo) {
        this.stuNo = stuNo;
    }

    public Teacher getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }
}
